<template>
  <div class="base_bottom_buttons" :class="layer.data.fixed ? 'fixed' : ''">
    <div class="base_bottom_buttons_items">
      <button
        type="button"
        @click="cancelHandle"
        v-if="layer.data.buttons.indexOf('cancel') > -1"
      >
        取消
      </button>
      <button
        type="button"
        @click="submitHandle"
        v-if="layer.data.buttons.indexOf('submit') > -1"
      >
        提交
      </button>
      <button
        type="button"
        @click="saveHandle"
        v-if="layer.data.buttons.indexOf('save') > -1"
      >
        保存
      </button>
      <button
        type="button"
        @click="goBackHandle"
        v-if="layer.data.buttons.indexOf('goBack') > -1"
      >
        后退
      </button>
    </div>
  </div>
</template>
<script>
import { Base } from "../../../../mixins/index";
export default {
  mixins: [Base],
  props: {
    nodeId: {
      type: String,
      default() {
        return "Home";
      },
    },
    tasksConfig: {
      type: Object,
      default() {
        return {};
      },
    },
    layer: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {};
  },
};
</script>
<style lang="less">
.base_bottom_buttons {
  display: flex;
  align-items: center;
  &.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    .base_bottom_buttons_items {
      display: flex;
      flex: 1;
      justify-content: center;
    }
  }
}
</style>
